Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=20865
* gdk/directfb/gdkvisual-directfb.c: Avoid a crash in
_gdk_visual_init(). Patch by Huimin He.
+2008-07-18 Federico Mena Quintero <federico@novell.com>
+
+ * gtk/updateiconcache.c (build_cache): If the resulting cache file
+ would be empty, erase the old cache file as well as the temporary file.
+
2008-07-18 Federico Mena Quintero <federico@novell.com>
* demos/gtk-demo/changedisplay.c (find_toplevel_at_pointer): Don't
#endif
tmp_cache_path = g_build_filename (path, "."CACHE_NAME, NULL);
+ cache_path = g_build_filename (path, CACHE_NAME, NULL);
if ((fd = g_open (tmp_cache_path, O_WRONLY | O_CREAT | O_EXCL | O_TRUNC | _O_BINARY, mode)) == -1)
{
fclose (cache);
g_unlink (tmp_cache_path);
+ g_unlink (cache_path);
exit (0);
}
exit (1);
}
- cache_path = g_build_filename (path, CACHE_NAME, NULL);
-
#ifdef G_OS_WIN32
if (g_file_test (cache_path, G_FILE_TEST_EXISTS))
{